package com.offcn.service;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

public class Client {
    public static void main(String[] args) {
        JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
        factoryBean.setAddress("http://localhost:8000/ws/hello?wsdl");
        factoryBean.setServiceClass(UserService.class);
        UserService userService = factoryBean.create(UserService.class);
        String result = userService.sayHi("悟空");
        System.out.println(result);
    }
}
